package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class BooleanTerm {

    private int beginIndex;
    private int endIndex;
    private List<BooleanFactor> booleanFactorList;

    public BooleanTerm(List<BooleanFactor> booleanFactorList) {
        this.beginIndex = booleanFactorList.get(0).getBeginIndex();
        this.endIndex = booleanFactorList.get(booleanFactorList.size() - 1).getEndIndex();
        this.booleanFactorList = booleanFactorList;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public int size() {
        return booleanFactorList.size();
    }

    public BooleanFactor get(int index) {
        return booleanFactorList.get(index);
    }

}
